// 直接返回left，绝了
class Solution {
    public int missingNumber(int[] nums) {
        int left = 0, right = nums.length - 1;
        while(left <= right){
            int mid = (left + right) >> 1;
            if(nums[mid] == mid){
                left = mid + 1;
            } else {
                right = mid - 1;
            }
        }
        return left;
    }
}